import java.util.Scanner;

public class MeiHuiwen {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
//        Scanner sin = new Scanner(System.in);
        String s = in.next();
        int ans = 0;
        char pre = s.charAt(0);

        for(int i=1;i<s.length();i++) {
            if(s.charAt(i) == pre){
                ans++;
                pre = s.charAt(i);
            }
        }
        System.out.println(ans);

    }


}
